import { createHashRouter } from 'react-router-dom'
import AdminPanel from "../pages/AdminPanel";
import UserManagement from "../pages/UserManagement";
import ProductEntry from "../pages/ProductEntry";
import Login from "../pages/login";
import NotFound from "../pages/NotFound";

const routes = createHashRouter([
    {
        path:"/login",
        element:<Login/>
    },
    {
        path: '*',
        element: <NotFound />,
    },
    {
        path:"/",
        element:<AdminPanel/>,
        children:[
            {
                index: true,
                element:<UserManagement/>
            },
            {
                path:"goods",
                element:<ProductEntry/>
            },
        ]
    }
]);

export default routes;
